package com.ruoyi.cbfa.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cbfa.mapper.InsurancePlanDetailMapper;
import com.ruoyi.cbfa.domain.InsurancePlanDetail;
import com.ruoyi.cbfa.service.IInsurancePlanDetailService;

/**
 * 社保方案详情Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-30
 */
@Service
public class InsurancePlanDetailServiceImpl extends ServiceImpl<InsurancePlanDetailMapper, InsurancePlanDetail>
        implements IInsurancePlanDetailService
{
    @Autowired
    private InsurancePlanDetailMapper insurancePlanDetailMapper;

    /**
     * 查询社保方案详情
     *
     * @param id 社保方案详情主键
     * @return 社保方案详情
     */
    @Override
    public InsurancePlanDetail selectInsurancePlanDetailById(Long id)
    {
        return insurancePlanDetailMapper.selectInsurancePlanDetailById(id);
    }

    /**
     * 查询社保方案详情列表
     *
     * @param insurancePlanDetail 社保方案详情
     * @return 社保方案详情
     */
    @Override
    public List<InsurancePlanDetail> selectInsurancePlanDetailList(InsurancePlanDetail insurancePlanDetail)
    {
        return insurancePlanDetailMapper.selectInsurancePlanDetailList(insurancePlanDetail);
    }

    /**
     * 新增社保方案详情
     *
     * @param insurancePlanDetail 社保方案详情
     * @return 结果
     */
    @Override
    public int insertInsurancePlanDetail(InsurancePlanDetail insurancePlanDetail)
    {
        return insurancePlanDetailMapper.insertInsurancePlanDetail(insurancePlanDetail);
    }

    /**
     * 修改社保方案详情
     *
     * @param insurancePlanDetail 社保方案详情
     * @return 结果
     */
    @Override
    public int updateInsurancePlanDetail(InsurancePlanDetail insurancePlanDetail)
    {
        return insurancePlanDetailMapper.updateInsurancePlanDetail(insurancePlanDetail);
    }

    /**
     * 批量删除社保方案详情
     *
     * @param ids 需要删除的社保方案详情主键
     * @return 结果
     */
    @Override
    public int deleteInsurancePlanDetailByIds(Long[] ids)
    {
        return insurancePlanDetailMapper.deleteInsurancePlanDetailByIds(ids);
    }

    /**
     * 删除社保方案详情信息
     *
     * @param id 社保方案详情主键
     * @return 结果
     */
    @Override
    public int deleteInsurancePlanDetailById(Long id)
    {
        return insurancePlanDetailMapper.deleteInsurancePlanDetailById(id);
    }
    @Override
    public List<InsurancePlanDetail> selectInsurancePlanDetailByCategoryId(Integer categoryId) {
       return insurancePlanDetailMapper.selectInsurancePlanDetailByCategoryId(categoryId);
    }
}
